/*
 * @Authoryour name
 * @Date2020-11-28 22:46:40
 * @LastEditTime2020-11-28 22:46:40
 * @LastEditorsyour name
 * @DescriptionIn User Settings Edit
 * @FilePath\STM32H750_FreeRTOS\User\schedule\schedule.h
 */ 
#ifndef SCHEDULE_H_
#define SCHEDULE_H_

#include "FreeRTOS.h"
#include "task.h"

#define TASK_NUM  2

typedef struct task_info
{
	TaskFunction_t task_handler;
    const char * const task_name;	
    const uint32_t stack_depth;
    void * const para;
    UBaseType_t priority;
    StackType_t * const stack_buffer;
    StaticTask_t * const tcb;
}task_info_t;

extern const task_info_t task_infos[TASK_NUM];
extern TaskHandle_t task_handles[TASK_NUM];

extern void schedule_init(void);
task_info_t *schedule_find_task_info(uint32_t stack_addr);

#endif /* SCHEDULE_H_ */
